package com.eportal.service;

import com.eportal.domain.Sysopt;
import com.eportal.domain.TCommunity;
import com.eportal.vo.controller.background.community.TCommunitySelectVO;
import com.framework.jqgrid.JqGridPager;

import java.util.List;
import java.util.Map;

/**
 * @author chencheng
 */
public interface TCommunityService {
	 List<TCommunity> list(JqGridPager jqGridPager);

	 TCommunity get(Long id);

	    void delete(Long id);

	    void update(TCommunity tCommunity) throws Exception;

	    void delete(List<Long> ids);

	    Object getObject(String sql);

	    void update(Object entity) throws Exception;

	    TCommunity add(TCommunity tCommunity) throws Exception;

		Map<String, Object> addMethod(TCommunity tCommunity);

		Map<String, Object> updateMethod(TCommunity tCommunity, String adminUserName, String password);

		Map<String, Object> deleteMethod(String param_ids);

		List<TCommunity> list(String sql);

		Map<String, Object> tComuAddMethod(TCommunity tCommunity);

		Map<String, Object> tComuLockAddMethod(TCommunity tCommunity, String pid, String checkCode,String lockName, String type, String typeAPP,String appid, String pwd);

		Map<String, Object> auditMethod(String sid, String status, String appSid, String comm) throws Exception;

		TCommunity get(String inviteUrl);

		List<TCommunity> auditList(JqGridPager page, String agtCode);

		List<TCommunity> listByAgtCodes(String agtCodes);

		Map<String, String> getBySql(Long sid);

		Map<String, Object> SyncTo(TCommunity tCommunity);

		Map<String, Object> addtCommunity(TCommunity tCommunity, String roleId, String status, String typeAPP);

		public List<Map<String, Object>> listBySql(String sql);


//todo ---------------------------------------------------------------------------------------------------------------

	/**
	 * 小区列表（下拉）
     * @author Saber
     * @Date 2017/8/2 下午1:44
     * @param agtCode           合作方id
	 * @param user              当前用户
	 * @param userRole          当前用户userRole
	 * @return
	 */
	List<TCommunitySelectVO> selectList(String agtCode, Sysopt user, int userRole);
}
